package com.example.db;

import com.example.db.bean.User;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by kkmike999 on 16/2/12.
 */
public class UserHelper {

	public static User[] createUserList(int count) {
		User[] users = new User[count];

		for (int i = 0; i < count; i++) {
			User user = new User();

			user.uid = i;
			user.name = "user_" + i;
			user.faceurl = "faceurl_" + i;

			users[i] = user;
		}

		return users;
	}

	public static List<Integer> getUidList(User[] users) {
		List<Integer> list = new ArrayList<>();

		// 提取uid列表
		for (User user : users) {
			list.add(user.uid);
		}

		return list;
	}
}
